<script setup>
  import {ref} from "vue";

  const rq=ref('');
  const sj=ref('');
  const times=ref([]);
  const f=()=>{
    console.log(times.value)
    console.log(times.value[0])
    console.log(times.value[1])
  }
</script>

<template>
  <h1>日期时间选择器组件</h1>
  <el-date-picker type="datetime" @change="console.log(sj)" v-model="sj" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"></el-date-picker>
  <br>
  <h1>日期时间选择器组件</h1>
  <el-date-picker type="date" @change="console.log(rq)" v-model="rq" format="YYYY-MM-DD" value-format="YYYY-MM-DD"></el-date-picker>
  <br>
  <h1>日期时间选择器组件</h1>
  <el-date-picker type="datetimerange" @change="f" v-model="times" format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
  start-placeholder="请选择开始时间" end-placeholder="请选择结束时间" range-separator="到"></el-date-picker>
</template>

<style scoped>

</style>